<template>
  <view class="my-search-container" :style="{'background-color':bgcolor}" @click="gotoSearch">
    <view class="my-search-box" :style="{'border-radius':radius+'px'}">
      <uni-icons type="search" size="17"></uni-icons>
      <text class="placeholder">搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    props:{
      bgcolor:{
        type:String,
        default:'#c01c56'
      },
      radius:{
        type:Number,
        default:18
      }
    },
    data() {
      return {
        
      };
    },
    methods:{
      gotoSearch(){
        this.$emit('myclick')
      }
    }
  }
</script>

<style lang="scss">
    .my-search-container{
      // background-color: #c01c56;
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100rpx;
      padding: 0 10rpx;
      .my-search-box{
        height: 72rpx;
        background-color: #FFFFFF;
        width: 100%;
        // border-radius: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        .placeholder{
          line-height: 72rpx;
          margin-left: 5px;
        }
      }
    }
</style>
